package online.liulei.design.mode;

/**
 * 装饰者类
 */
public class WhipDecorator implements Decorator{

    private Beverage beverage;

    public WhipDecorator(Beverage beverage){
        this.beverage =beverage;
    }

    @Override
    public double cost() {
        double whipPrice = 1.2;
        return beverage.cost() + whipPrice;
    }

    @Override
    public String description() {
        return beverage.description() + "（用鸡蛋、鲜奶油与水果混合制成的）甜品配料>>";
    }
}
